{// 引入标签库 }
<tagLib name="html" />
<include file="Public:header" />
<div class="main">
<div class="main_title">{%INSTALL} <a href="{:u("Medal/index")}" class="back_list">{%BACK_LIST}</a></div>
<div class="blank5"></div>
<form name="edit" action="__APP__" method="post" enctype="multipart/form-data">
<table class="form" cellpadding=0 cellspacing=0>
	<tr>
		<td colspan=2 class="topTd"></td>
	</tr>
	<tr>
		<td class="item_title">勋章名称:</td>
		<td class="item_input">
			<input type="text" class="textbox" value="{$data.name}" name="name" />
		</td>
	</tr>
	<tr>
		<td class="item_title">{%CLASS_NAME}:</td>
		<td class="item_input">
			{$data.class_name}
			<input type="hidden" value="{$data.class_name}" name="class_name" />
		</td>
	</tr>
	<tr>
		<td class="item_title">{%IS_EFFECT}:</td>
		<td class="item_input">
			<lable>{%IS_EFFECT_1}<input type="radio" name="is_effect" value="1" checked="checked" /></lable>
			<lable>{%IS_EFFECT_0}<input type="radio" name="is_effect" value="0" /></lable>
		</td>
	</tr>
	<tr>
		<td class="item_title">勋章图片:</td>
		<td class="item_input">
			<html:imgUpload name = 'icon' id='icon' value="$data.icon"  />
		</td>
	</tr>
	<tr>
		<td class="item_title">{%DESCRIPTION}:</td>
		<td class="item_input">
			<textarea class="textarea" name="description" >{$data.description}</textarea>
		</td>
	</tr>
	<tr>
		<td class="item_title">点亮规则:</td>
		<td class="item_input">
			<textarea class="textarea" name="route" >{$data.route}</textarea>			
		</td>
	</tr>
	<if condition="$data['config']">
	<tr>
		<td class="item_title">配置:</td>
		<td class="item_input">
			<foreach name="data.config" item="config">
				<php>$config_name = $key; </php>
				<span class="cfg_title">{:trim($data['lang'][$key])}:</span>
				<span class="cfg_content">
				<if condition="$config['INPUT_TYPE'] eq 0">
				<input type="text" class="textbox" name="config[{$key}]" value="" />
				<elseif condition="$config['INPUT_TYPE'] eq 2" />
				<input type="password" class="textbox" name="config[{$key}]" value="" />
				<elseif condition="$config['INPUT_TYPE'] eq 3" />				
					<foreach name="config.VALUES" item="val">
						<label><input type="checkbox" name="config[{$config_name}][{$val}]" value="1">{:trim($data['lang'][$config_name."_".$val])}</label>
						<br />
					</foreach>
				<else />
				<select name="config[{$key}]" >
					<foreach name="config.VALUES" item="val">
						<option value="{$val}">{:trim($data['lang'][$config_name."_".$val])}</option>
					</foreach>
				</select>
				</if>
				</span>
				<div class="blank5"></div>
			</foreach>
		</td>
	</tr>
	</if>
	<tr>
		<td class="item_title"></td>
		<td class="item_input">
			<!--隐藏元素-->
			<input type="hidden" name="allow_check" value="{$data.allow_check}" />
			<input type="hidden" name="{:conf("VAR_MODULE")}" value="Medal" />
			<input type="hidden" name="{:conf("VAR_ACTION")}" value="insert" />
			<!--隐藏元素-->
			<input type="submit" class="button" value="{%ADD}" />
			<input type="reset" class="button" value="{%RESET}" />
		</td>
	</tr>
	<tr>
		<td colspan=2 class="bottomTd"></td>
	</tr>
</table>	 
</form>
</div>
<include file="Public:footer" />